package com.cy.pj.sys.dao;

import com.cy.pj.sys.entity.SysUser;
import com.cy.pj.sys.vo.SysUserDeptVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SysUserDao {

    int getRowCount(String username);

    List<SysUserDeptVo> findPageObjects(String username,
                                        Integer startIndex,
                                        Integer pageSize);

    int validById(Integer id,Integer valid,String modifiedUser);

    int insertObject(SysUser entity);

    SysUserDeptVo findObjectById(Integer id);

    int updateObject(SysUser entity);

    int updatePassword(String password,String salt, Integer id);

    @Select("select * from sys_users where username=#{username}")
    SysUser findUserByUserName(String username);
}
